Using text layers

Text layer is used for displaying the text as a 2D overlay. For example, use a text layer to show text in a head-up display.

Note that in order to properly render text you have to use a font that supports the languages you want to include in your Kanzi application.

Adding text with a text layer

To add text with a text layer:

  1. In the Project right-click the object to which you want to add the Text Layer and select Create > Text Layer.
  2. In the Properties in the Text property add the text you want to display. To add a new line press Shift+Enter.
  3. In the Font property select the font you want to use. See Importing fonts.
  4. Set the Font Size property to change the size of the displayed text.
  5. (Optional) Enable the Complex Script Support property if you want to:

Changing the text in a text layer with native code

You can change the text shown by a text layer in C application of your Kanzi application by changing the Text property with kzuObjectNodeSetStringProperty(textLayer, KZU_PROPERTY_TYPE_TEXT_LAYER__TEXT, "Enter your text here.").

See also

Importing fonts

Using text blocks

Internationalization

Size of the glyph cache texture